using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud._Conversion
{
    /// <summary>
    /// <para>LAS Dataset To TIN</para>
    /// <para>Exports a triangulated irregular network (TIN) from a  LAS dataset.</para>
    /// <para>从 LAS 数据集导出三角化不规则网络 （TIN）。</para>
    /// </summary>    
    [DisplayName("LAS Dataset To TIN")]
    public class LasDatasetToTin : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LasDatasetToTin()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        /// <param name="_out_tin">
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// </param>
        public LasDatasetToTin(object _in_las_dataset, object _out_tin)
        {
            this._in_las_dataset = _in_las_dataset;
            this._out_tin = _out_tin;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "LAS Dataset To TIN";

        public override string CallName => "3d.LasDatasetToTin";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "tinSaveVersion", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _out_tin, _thinning_type.GetGPValue(), _thinning_method.GetGPValue(), _thinning_value, _max_nodes, _z_factor, _clip_to_extent.GetGPValue()];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_tin { get; set; }


        /// <summary>
        /// <para>Thinning Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of thinning to be used to reduce the LAS data points saved as the nodes in the resulting TIN.</para>
        ///   <bulletList>
        ///     <bullet_item>No Thinning—No thinning is applied. This is the default.</bullet_item><para/>
        ///     <bullet_item>Random—LAS data points are randomly selected based on the corresponding Thinning Method selection and Thinning Value entry.</bullet_item><para/>
        ///     <bullet_item>Window Size—The LAS dataset is divided into square tiles defined by Thinning Value and LAS points are selected using Thinning Method.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于减少保存为生成的 TIN 中的节点的 LAS 数据点的细化类型。</para>
        ///   <bulletList>
        ///     <bullet_item>不变薄 （No Thining） - 不应用变薄。这是默认设置。</bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item>窗口大小 - 将 LAS 数据集划分为由“细化值”定义的方形切片，并使用“稀释法”选择 LAS 点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Thinning Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _thinning_type_value _thinning_type { get; set; } = _thinning_type_value._NONE;

        public enum _thinning_type_value
        {
            /// <summary>
            /// <para>No Thinning</para>
            /// <para>No Thinning—No thinning is applied. This is the default.</para>
            /// <para>不变薄 （No Thining） - 不应用变薄。这是默认设置。</para>
            /// </summary>
            [Description("No Thinning")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Random</para>
            /// <para>Random—LAS data points are randomly selected based on the corresponding Thinning Method selection and Thinning Value entry.</para>
            /// <para></para>
            /// </summary>
            [Description("Random")]
            [GPEnumValue("RANDOM")]
            _RANDOM,

            /// <summary>
            /// <para>Window Size</para>
            /// <para>Window Size—The LAS dataset is divided into square tiles defined by Thinning Value and LAS points are selected using Thinning Method.</para>
            /// <para>窗口大小 - 将 LAS 数据集划分为由“细化值”定义的方形切片，并使用“稀释法”选择 LAS 点。</para>
            /// </summary>
            [Description("Window Size")]
            [GPEnumValue("WINDOW_SIZE")]
            _WINDOW_SIZE,

        }

        /// <summary>
        /// <para>Thinning Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the technique to be used to reduce the LAS data points, which impacts the interpretation of Thinning Value. The available options depend on the selected Thinning Type.</para>
        ///   <bulletList>
        ///     <bullet_item>Percent—Thinning value will reflect the percentage of LAS points that will be preserved in the output</bullet_item><para/>
        ///     <bullet_item>Node Count—Thinning value will reflect the total number of nodes that are allowed in the output</bullet_item><para/>
        ///     <bullet_item>Minimum Z—Selects the LAS data point with the lowest elevation in each window size area</bullet_item><para/>
        ///     <bullet_item>Maximum Z—Selects the LAS data point with the highest elevation in each of the automatically determined window size areas</bullet_item><para/>
        ///     <bullet_item>Closest To Mean Z—Selects the LAS data point with the elevation closest to the average value found in the automatically determined window size areas</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于减少 LAS 数据点的技术，该技术会影响“细化值”的解释。可用选项取决于所选的“减薄类型”。</para>
        ///   <bulletList>
        ///     <bullet_item>百分比 - 变薄值将反映将在输出中保留的 LAS 点的百分比</bullet_item><para/>
        ///     <bullet_item>节点计数 - 细化值将反映输出中允许的节点总数</bullet_item><para/>
        ///     <bullet_item></bullet_item><para/>
        ///     <bullet_item>最大 Z - 选取每个自动确定的窗口大小区域中具有最高高程的 LAS 数据点</bullet_item><para/>
        ///     <bullet_item>最接近均值 Z - 选取高程最接近自动确定的窗口大小区域中的平均值的 LAS 数据点</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Thinning Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _thinning_method_value? _thinning_method { get; set; } = null;

        public enum _thinning_method_value
        {
            /// <summary>
            /// <para>Percent</para>
            /// <para>Percent—Thinning value will reflect the percentage of LAS points that will be preserved in the output</para>
            /// <para>百分比 - 变薄值将反映将在输出中保留的 LAS 点的百分比</para>
            /// </summary>
            [Description("Percent")]
            [GPEnumValue("PERCENT")]
            _PERCENT,

            /// <summary>
            /// <para>Node Count</para>
            /// <para>Node Count—Thinning value will reflect the total number of nodes that are allowed in the output</para>
            /// <para>节点计数 - 细化值将反映输出中允许的节点总数</para>
            /// </summary>
            [Description("Node Count")]
            [GPEnumValue("NODE_COUNT")]
            _NODE_COUNT,

            /// <summary>
            /// <para>Minimum Z</para>
            /// <para>Minimum Z—Selects the LAS data point with the lowest elevation in each window size area</para>
            /// <para></para>
            /// </summary>
            [Description("Minimum Z")]
            [GPEnumValue("MIN")]
            _MIN,

            /// <summary>
            /// <para>Maximum Z</para>
            /// <para>Maximum Z—Selects the LAS data point with the highest elevation in each of the automatically determined window size areas</para>
            /// <para>最大 Z - 选取每个自动确定的窗口大小区域中具有最高高程的 LAS 数据点</para>
            /// </summary>
            [Description("Maximum Z")]
            [GPEnumValue("MAX")]
            _MAX,

            /// <summary>
            /// <para>Closest To Mean Z</para>
            /// <para>Closest To Mean Z—Selects the LAS data point with the elevation closest to the average value found in the automatically determined window size areas</para>
            /// <para>最接近均值 Z - 选取高程最接近自动确定的窗口大小区域中的平均值的 LAS 数据点</para>
            /// </summary>
            [Description("Closest To Mean Z")]
            [GPEnumValue("CLOSEST_TO_MEAN")]
            _CLOSEST_TO_MEAN,

        }

        /// <summary>
        /// <para>Thinning Value</para>
        /// <para><xdoc>
        ///   <para>The thinning value's interpretation depends on the selection made for Thinning Type.</para>
        ///   <para>If Thinning Type is set to Window Size, this value represents the sampling area by which the LAS dataset will be divided.</para>
        ///   <para>If Thinning Type is set to Random and Thinning Method is set to Percent, this value represents the percentage of LAS points that will be exported to the TIN.</para>
        ///   <para>If Thinning Type is set to Random and Thinning Method is set to Node Count, this value represents the total number of LAS points that can be exported to the TIN.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>细化值的解释取决于对“稀疏类型”所做的选择。</para>
        ///   <para>如果“细化类型”设置为“窗口大小”，则此值表示将划分 LAS 数据集的采样区域。</para>
        ///   <para>如果“细化类型”设置为“随机”，而“稀释方法”设置为“百分比”，则此值表示将导出到 TIN 的 LAS 点的百分比。</para>
        ///   <para>如果“细化类型”设置为“随机”，而“细化方法”设置为“节点计数”，则此值表示可导出到 TIN 的 LAS 点总数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Thinning Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _thinning_value { get; set; } = 0;


        /// <summary>
        /// <para>Maximum Number of Output Nodes</para>
        /// <para>The maximum number of nodes permitted in the output TIN. The default is 5 million.</para>
        /// <para>输出 TIN 中允许的最大节点数。默认值为 500 万。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Number of Output Nodes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_nodes { get; set; } = 5000000;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor by which z-values will be multiplied. This is typically used to convert z linear units to match x,y linear units. The default is 1, which leaves elevation values unchanged. This parameter is not available if the spatial reference of the input surface has a z datum with a specified linear unit.</para>
        /// <para>z 值将乘以的因子。这通常用于转换 z 线性单位以匹配 x，y 线性单位。默认值为 1，使高程值保持不变。如果输入曲面的空间参考具有具有指定线性单位的 z 基准面，则此参数不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        /// <summary>
        /// <para>Clip to Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the resulting TIN will be clipped against the analysis extent. This only has an effect if the analysis extent is a subset of the input LAS dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Clips the output TIN against the analysis extent. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Does not clip the output TIN against the analysis extent.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否针对分析范围裁剪生成的 TIN。仅当分析范围是输入 LAS 数据集的子集时，这才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 根据分析范围裁剪输出 TIN。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不根据分析范围裁剪输出 TIN。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Clip to Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _clip_to_extent_value _clip_to_extent { get; set; } = _clip_to_extent_value._true;

        public enum _clip_to_extent_value
        {
            /// <summary>
            /// <para>CLIP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLIP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CLIP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CLIP")]
            [GPEnumValue("false")]
            _false,

        }

        public LasDatasetToTin SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object tinSaveVersion = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, tinSaveVersion: tinSaveVersion, workspace: workspace);
            return this;
        }

    }

}